package com.zjm.creational.prototype.improve;

public class Client {
    public static void main(String[] args) {
        Sheep sheep = new Sheep("Tom", 1, "白色");
        sheep.setFriend(new Sheep("Jack", 1, "黑色"));
        Sheep sheep2 = sheep.clone();
        Sheep sheep3 = sheep.clone();
        Sheep sheep4 = sheep.clone();
        Sheep sheep5 = sheep.clone();
        Sheep sheep6 = sheep.clone();

        System.out.println(sheep + "friend:" + sheep.getFriend().hashCode());
        System.out.println(sheep2 + "friend:" + sheep2.getFriend().hashCode());
        System.out.println(sheep3 + "friend:" + sheep3.getFriend().hashCode());
        System.out.println(sheep4 + "friend:" + sheep4.getFriend().hashCode());
        System.out.println(sheep5 + "friend:" + sheep5.getFriend().hashCode());
        System.out.println(sheep6 + "friend:" + sheep6.getFriend().hashCode());
    }
}
